﻿using System;
using System.Collections.Generic;
using System.Text;
using NExt.Core.Model.Base;

namespace NExt
{
    public class Panel : Panel<PanelEvents>
    {
    }

    public abstract class Panel<TEvents>: Container<TEvents>
        where TEvents : PanelEvents, new()
    {
        protected Panel()
        {
            buttons = new List<object>();
            keys = new List<object>();
            tools = new List<object>();
        }

        public bool? animCollapse { get; set; }
        public bool? autoLoad { get; set; }
        public bool? autoScroll { get; set; }
        public string baseCls { get; set; }
        public Toolbarr bbar { get; set; }
        public bool? bodyBorder { get; set; }
        public object bodyCfg { get; set; }
        public object bodyStyle { get; set; } //TODO
        public bool? border { get; set; }
        public string buttonAlign { get; set; }
        public IList<object> buttons { get; set; } // This is button
        public bool? closable { get; set; }
        public bool? collapseFirst { get; set; }
        public bool? collapsed { get; set; }
        public string collapsedCls { get; set; }
        public bool? collapsible { get; set; }
        public string contentEl { get; set; }
        public bool? draggable { get; set; }
        public string elements { get; set; }
        public bool? floating { get; set; }
        public bool? footer { get; set; }
        public bool? frame { get; set; }
        public bool? header { get; set; }
        public bool? headerAsText { get; set; }
        public bool? hideCollapseTool { get; set; }
        public object html { get; set; }
        public string iconCls { get; set; }
        public IList<object> keys { get; set; } //TODO
        public bool? maskDisabled { get; set; }
        public int? minButtonWidth { get; set; }
        public object shadow { get; set; } // TODO: bool or shadow type..
        public int? shadowOffset { get; set; }
        public bool? shim { get; set; }
        public string tabTip { get; set; }
        public Toolbarr tbar { get; set; }
        public string title { get; set; }
        public bool? titleCollapse { get; set; }
        public IList<object> tools { get; set; } //TODO: Make typed..
    }

    public class PanelEvents: ContainerEvents
    {
        public IScript activate { get; set; }
        public IScript beforeclose { get; set; }
        public IScript beforecollapse { get; set; }
        public IScript beforeexpand { get; set; }
        public IScript bodyresize { get; set; }
        public IScript close { get; set; }
        public IScript collapse { get; set; }
        public IScript deactivate { get; set; }
        public IScript expand { get; set; }
        public IScript titlechange { get; set; }
    }
}
